#ifndef _TRAIN_TX_SERVER_H_
#define _TRAIN_TX_SERVER_H_

#define MIS_MASK  0x1
#define RIS_MASK  0x2
#define TIS_MASK  0x4
#define RTIS_MASK 0x8

#define STALLED 0
#define TXREADY 1

#define REQ_BUFFER  0
#define REQ_STATUS  1

#define TX_INT  0
#define MS_INT  1

typedef struct __rx_reply {
  int ch;
} rx_reply;

typedef struct __train_tx_init {
  // TODO: put actual stuff in here
  int *state_ptr;
} train_tx_init;

typedef struct __train_tx_req {
  int state;
  char ch;
} train_tx_req;

typedef struct __train_tx_reply {
  int len;
  int buf[16];
} train_tx_reply;

int TrainRxInit();
void TrainRxNotifier();
void TrainRxServer();

int TrainTxInit();
void TrainTxNotifier();
void TrainTxServer();
void ComServer();
void TrainTransmitter();

#endif // _TRAIN_TX_SERVER_H_
